<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<script type='text/javascript' src='/SameBuilding/dwr/interface/PublicMessage.js'></script>
		<script type="text/javascript">
		function getPublicMessage(){
		PublicMessage.getLastessage(0,backPublicMessage);
		}
		function backPublicMessage(data){
		var PMDIV=document.getElementById("publicMessage");
		
		var htmlstr="";
		htmlstr+="<marquee id='marq' onmouseover='this.stop()' onmouseout='this.start()' direction='left' scrollamount='2'>";
		htmlstr+=data.publisherName+" : "+data.content;
		htmlstr+="</marquee>";
		PMDIV.innerHTML=htmlstr;
		}
		function isOver(){
		var offset=marq.offsetWidth;
		var scrol=marq.scrollLeft;
		if(offset-scrol<=0){
		getPublicMessage();
		 }
		}
		setInterval("isOver();",1000);
		</script>
